<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>code</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/weui.min.css') }}">
    <script type="text/javascript" src="{{ url_for('static', filename='js/jquery.js') }}"></script>

</head>
<body>
<div class="container js_container">
    <div class="page slideIn msg" id="before">
        <div class="weui_msg">
            <div class="weui_icon_area"><i class="weui_icon_success weui_icon_msg"></i></div>
            <div class="weui_text_area">
                <h2 class="weui_msg_title">扫码成功</h2>
                <p class="weui_msg_desc">内容详情，可根据实际需要安排</p>
            </div>
            <div class="weui_opr_area">
                <p class="weui_btn_area">
                    <a id="confirm" href="javascript:void(0);" class="weui_btn weui_btn_primary">确定</a>
                    <a id="cancel" href="javascript:void(0);" class="weui_btn weui_btn_default">取消</a>
                </p>
            </div>
            <div class="weui_extra_area">
                <a href="javascript:void(0);">查看详情</a>
            </div>

        </div>
    </div>
    <div class="page slideIn msg" id="after" style="display: none;">
        <div class="weui_msg">
            <div class="weui_icon_area"><i class="weui_icon_success weui_icon_msg"></i></div>
            <div class="weui_text_area">
                <h2 class="weui_msg_title">成功</h2>
                <p class="weui_msg_desc">内容详情，可根据实际需要安排</p>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    $('#confirm').click(function(){
        var data = {
            uuid : '{{ login_code.uuid }}',
            openid : '{{ login_code.openid }}'
        };
        $.post('/wx_auth/confirm.do',data, function(res){
            if(res.state == 200){
                $('#before').hide()
                $('#after').show()
            }
            console.log(res)
        })
    })
</script>
</body>
</html>